{% load i18n themes posttags render%}
{% theme_extends "base.html" %}
{% block title %}{{post.title}}-{{ block.super }} {% endblock %}
{% block meta %}<meta content="{{post.title}},Pylogs" name="keywords"/>
<meta name="description" content="{{post.content|striptags|truncatewords_html:30}}"/>{%endblock%}
{% block script %}<script type="text/javascript" src="{%media_url%}/js/common.js"></script>{%endblock%}

{% block content %}
<!--Start of prompt-->
 {% if msg %}
 <div class="message">{{msg}}</div>
 {% endif %}
 <!--End of prompt--> 
<!--Start of content-->
<div class="entry">
      <h1>
        {{post.title}}
      </h1>
      <div class="byline">
          {% trans "Pubdate" %}:{{post.pubdate|date:"Y-m-d H:i:s"}} | {{post.hits}} {% trans "Views" %}<br/>
        {%trans "Categories" %}: 
    {% for cat in post.category.all %}
    <a href="{{cat.get_absolute_url}}">{{cat.name}}</a>
    {% if not forloop.last %}
    ,
    {% endif %}
    {% endfor %}
     {% if post.tags.all %}
    <!--tags-->
    <br/>{%trans "Tags" %}:
    {% for tag in post.tags.all %}
    <a href="{{tag.get_absolute_url}}">{{tag.name}}</a>{% if not forloop.last %},{% endif %}
    {% endfor %}
    {% endif %}
      </div>
      <div class="body">
        <p>
    {{post.content|markup:post.markup|safe}}
        </p>
        
      </div>
      
    </div>     

 {% ifnotequal 0 post.comment_count %}   
    <!--Start of comments-->    
    <div id="comments">
        <span class="commenttitle"><a name="comments"></a>{% trans "Comments" %}</span>
        <ul>
        {% for cmt in comments.object_list%}
           <li class="{% cycle alt1,alt2,alt3 %}">
            <strong>{% if cmt.comment_author_url %}<a href="{{cmt.comment_author_url}}" target="_blank">{{cmt.comment_author}}</a>
            {% else %}{{cmt.comment_author}}
            {% endif %}</strong> <span class="byline">{% trans "Post at" %} {{cmt.comment_date|date:"Y-m-d H:i:s"}}</span>        
           <br/>
          {{cmt.comment_content|linebreaks }}     
           </li>
        {% endfor %}
        </ul>{%paginator comments '#comments'%}
    </div>
 {% endifnotequal %}
        {% include "blog/comment_form.html" %}

    <!--End of comments-->
{% endblock %}
<!--End of content-->
